package com.wzj.uarmor.controller;

import com.wzj.uarmor.domain.VirusKill;
import com.wzj.uarmor.utils.ResponseStatus;
import com.wzj.uarmor.utils.ResponseVO;
import com.wzj.uarmor.utils.ResultUtil;
import org.springframework.web.bind.annotation.*;

import java.util.Date;
import java.util.LinkedList;
import java.util.List;

/**
 * 磁盘隐射日志(废弃)
 * @author lei.l
 * @version 1.0
 * @date 2023/1/31 17:07
 */
@RestController
@RequestMapping("/desc/logs")
@Deprecated
public class LogsController {

    /**
     * 日志列表
     * @param data
     * @return
     */
    @PostMapping("/list")
    public ResponseVO  selectList(@RequestBody String data){
        //解析条件作筛选
        VirusKill logs = new VirusKill() ;
        logs.setId(1);
        logs.setIp("225.168.2.16");
        logs.setDate( new Date());
        logs.setFilePath("/sasf/daw/aa");
 /*       logs.setFileRemark("下载");
        logs.setUserName("laozhang123");
        logs.setFileRemark("文件名与扩展名不符");
        logs.setTrans("cifs");
        logs.setTransTraget("下载");*/
        List list = new LinkedList();
        list.add(logs);
        return ResultUtil.success("成功",list);
    }

    /**
     * 清空日志
     * @return
     */
    @GetMapping("/deleted")
    public   ResponseVO  deletedLogs(){
        //清空日志
        return  ResultUtil.success(ResponseStatus.SUCCESS);
    }

    /**
     * 导出全部日志
     * @return
     */
    @GetMapping("/export")
    public ResponseVO logsExport(){
        return  ResultUtil.success(ResponseStatus.SUCCESS);
    }
}
